package org.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;
import org.example.dao.entity.Users;
import org.example.dto.req.*;
import org.example.dto.resp.UserPageVO;
import org.example.dto.resp.UserVO;
import org.example.result.Result;

import java.math.BigInteger;

//实现mybatis-plus
public interface UserService extends IService<Users> {
    Result createUser(UserRegisterReqDTO reqDTO, HttpServletRequest request);

    Users login(UserLoginReqDTO reqDTO, HttpServletRequest request);

    UserPageVO pagequery(UserPageQueryReqDTO reqDTO, HttpServletRequest request);

    UserVO getUserInfoById(BigInteger userId, HttpServletRequest request);

    void updateById(BigInteger userId, UserDTO users, HttpServletRequest request);

    void resetPassword(ResetPasswordDTO reqDTO, HttpServletRequest request);

    void deleteById(BigInteger userId, HttpServletRequest request);

    Result upgradeToAdmin(BigInteger userId, HttpServletRequest request);

    Result downgradeToUser(BigInteger userId, HttpServletRequest request);
}
